<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Chou_A_La_Creme extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$this->load->model('admin/chou_creme_model','chou_creme_model');
		$bakery_lists = $this->chou_creme_model->lists(1,1000);
		$lists['bakery_lists'] = '';
		$i = 1;
		$siteurl = base_url();
		foreach ($bakery_lists as $v) {
			$class = '';
			if(($i++)==1){
				$lists['first_img'] =<<<ddd
					<a href="{$siteurl}assets/image/chou-a-la-creme/{$v->cc_id}/{$v->cc_img}" title="{$v->cc_en} ({$v->cc_jp})" class="fancybox">
						<img src="{$siteurl}assets/image/chou-a-la-creme/{$v->cc_id}/{$v->cc_img}" alt="{$v->cc_en} ({$v->cc_jp})" class="img_link">
					</a>
ddd;
				$class = 'active';
			}
			
			$lists['bakery_lists'] .= "<li onclick='change_img(\"{$v->cc_id}\",\"{$v->cc_img}\",\"{$v->cc_en} ({$v->cc_jp})\")' class='$class {$v->cc_id}'>{$v->cc_en}<p>{$v->cc_jp}</p></li>";
		}
		
		$data['title'] = 'Bake a wish : Japanese Homemade Cake';
		$data['description'] = 'Bake a wish : Japanese Homemade Cake';
		$data['keywords'] = 'Bake a wish : Japanese Homemade Cake';
		$data['menu1'] = '';
		$data['menu2'] = '';
		$data['menu3'] = 'active';
		$data['menu4'] = '';
		$data['menu5'] = '';
		$data['menu6'] = '';
		$this->load->view('f_header_view.php',$data);
		$this->load->view('f_chou_a_la_creme_view.php',$lists);
		$this->load->view('f_footer_view.php');
	}
}

/* End of file chou_a_la_creme.php */
/* Location: ./application/controllers/chou_a_la_creme.php */